﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Cricket.LinqModel
{
    public static class Enumeration
    {
        public enum UserType : int
        {
            SuperAdmin = 1,
            SubAdmin = 2,
            Admin = 3,
            Client = 4
        }

        public enum Betting : int
        {
            Khadhi=1,
            Lagadi =2
        }
    }

    public class CricketGeneral
    {
        public string IPAddress(System.Web.HttpContext currentContext)
        {
            try
            {
                object obj = new object();
                obj = currentContext.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
                if (obj == null)
                {
                    obj = currentContext.Request.ServerVariables["REMOTE_ADDR"];
                }
                return obj.ToString();
            }
            catch (Exception ex)
            {
                return ex.Message;
            }
        }
    }
}
